package com.zegome.game.gomestory.main.helper;

import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.scenes.scene2d.ui.Image;

public class AnimatedActor extends Image
{
	private final AnimationDrawable drawable;
	
	public AnimatedActor(AnimationDrawable drawable)
	{
		super(drawable);
		this.drawable = drawable;
	}

	public void reset () {
		drawable.reset();
	}
	
	@Override	
	public void act(float delta)
	{
		drawable.act(delta);
		super.act(delta);
	}
	
	public int getFrame () {
		return drawable.frame;
	}
	
	public void setRegions(TextureRegion[] regions){		
		drawable.setRegions(regions);
	}
}
